<template>
    <div class="pet">          
      <img 
        :src="pet.profile"
        alt="" class="pet-img">            
      <div class="pet-basic-info">
        <div class="pet-title">
          <p>{{pet.pname}}</p>
          <svg class="icon index-icon gender" aria-hidden="true" v-if="pet.gender === 'female'">
            <use xlink:href="#icon-nv"></use>
          </svg>
          <svg class="icon index-icon gender" aria-hidden="true" v-if="pet.gender === 'male'">
            <use xlink:href="#icon-nan"></use>
          </svg>
        </div>
        <p>年龄：{{pet.age}}</p>
        <p>{{pet.details}}</p>
        <p>来自 {{pet.belong}}</p>
      </div>    
    </div>       
</template>
<script>
export default {
    props:['pet'],
    data() {
        return {
            
        }
    }
}
</script>
<style lang="less" scoped>
.pet{
          display: flex;
          height: 3rem;
          margin-bottom: 0.4rem;
          .pet-img{
            border-radius: 7%;
            width: 4.3rem;
          }
          .pet-basic-info{
            color: #a09ea0;
            font-size: 0.3rem;
            padding: 0.25rem;
            flex:1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            .pet-title {
              color: #38383b;
              font-size: 0.4rem;
              display: flex;
              justify-content: space-between;
              font-weight: bold;
              .gender {
                width: 0.5rem;
                height: 1.5em;
              }
            }
          }
        }
</style>